<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: Spec::DSL::BehaviourEval::ModuleMethods</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">Spec::DSL::BehaviourEval::ModuleMethods</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../../files/vendor/plugins/rspec/lib/spec/dsl/behaviour_eval_rb.html">
                vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000293">after_all_proc</a>&nbsp;&nbsp;
      <a href="#M000294">after_each_proc</a>&nbsp;&nbsp;
      <a href="#M000292">before_all_proc</a>&nbsp;&nbsp;
      <a href="#M000291">before_each_proc</a>&nbsp;&nbsp;
      <a href="#M000296">examples</a>&nbsp;&nbsp;
      <a href="#M000285">include</a>&nbsp;&nbsp;
      <a href="#M000295">included_modules</a>&nbsp;&nbsp;
      <a href="#M000284">inherit</a>&nbsp;&nbsp;
      <a href="#M000288">it</a>&nbsp;&nbsp;
      <a href="#M000286">it_should_behave_like</a>&nbsp;&nbsp;
      <a href="#M000290">method_missing</a>&nbsp;&nbsp;
      <a href="#M000287">predicate_matchers</a>&nbsp;&nbsp;
      <a href="#M000289">specify</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->
    <div id="includes">
      <h3 class="section-bar">Included Modules</h3>

      <div id="includes-list">
        <span class="include-name"><a href="../BehaviourCallbacks.html">BehaviourCallbacks</a></span>
      </div>
    </div>

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">behaviour</td>
          <td class="context-item-value">&nbsp;[W]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">description</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000285" class="method-detail">
        <a name="M000285"></a>

        <div class="method-heading">
          <a href="#M000285" class="method-signature">
          <span class="method-name">include</span><span class="method-args">(*mods)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
You can pass this one or many modules. Each module will subsequently be
included in the each object in which an example is run. Use this to provide
global helper methods to your <a
href="ModuleMethods.html#M000296">examples</a>.
</p>
<h2><a href="../Example.html">Example</a></h2>
<pre>
  module HelperMethods
    def helper_method
      ...
    end
  end

  describe Thing do
    include HelperMethods
    it &quot;should do stuff&quot; do
      helper_method
    end
  end
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000285-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000285-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 42</span>
42:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">include</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">mods</span>)
43:           <span class="ruby-identifier">mods</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">mod</span><span class="ruby-operator">|</span>
44:             <span class="ruby-identifier">included_modules</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">mod</span>
45:             <span class="ruby-identifier">mod</span>.<span class="ruby-identifier">send</span> <span class="ruby-identifier">:included</span>, <span class="ruby-keyword kw">self</span>
46:           <span class="ruby-keyword kw">end</span>
47:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000284" class="method-detail">
        <a name="M000284"></a>

        <div class="method-heading">
          <a href="#M000284" class="method-signature">
          <span class="method-name">inherit</span><span class="method-args">(klass)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
RSpec runs every example in a new instance of <a
href="../../../Object.html">Object</a>, mixing in the behaviour necessary
to run <a href="ModuleMethods.html#M000296">examples</a>. Because this
behaviour gets mixed in, <a href="ModuleMethods.html#M000288">it</a> can
get mixed in to an instance of any class at all.
</p>
<p>
This is something that you would hardly ever use, but there is one common
use case for <a href="ModuleMethods.html#M000288">it</a> - inheriting from
<a href="../../../Test/Unit/TestCase.html">Test::Unit::TestCase</a>.
RSpec&#8216;s Rails plugin uses this feature to provide access to all of
the features that are available for <a
href="../../../Test/Unit.html">Test::Unit</a> within RSpec <a
href="ModuleMethods.html#M000296">examples</a>.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000284-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000284-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 18</span>
18:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherit</span>(<span class="ruby-identifier">klass</span>)
19:           <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">&quot;Shared behaviours cannot inherit from classes&quot;</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@behaviour</span>.<span class="ruby-identifier">shared?</span>
20:           <span class="ruby-ivar">@behaviour_superclass</span> = <span class="ruby-identifier">klass</span>
21:           <span class="ruby-identifier">derive_execution_context_class_from_behaviour_superclass</span>
22:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000288" class="method-detail">
        <a name="M000288"></a>

        <div class="method-heading">
          <a href="#M000288" class="method-signature">
          <span class="method-name">it</span><span class="method-args">(description=:__generate_description, opts={}, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates an instance of <a href="../Example.html">Spec::DSL::Example</a> and
adds <a href="ModuleMethods.html#M000288">it</a> to a collection of <a
href="ModuleMethods.html#M000296">examples</a> of the current behaviour.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000288-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000288-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 116</span>
116:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">it</span>(<span class="ruby-identifier">description</span>=<span class="ruby-identifier">:__generate_description</span>, <span class="ruby-identifier">opts</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
117:           <span class="ruby-identifier">examples</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">Example</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">description</span>, <span class="ruby-identifier">opts</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
118:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000286" class="method-detail">
        <a name="M000286"></a>

        <div class="method-heading">
          <a href="#M000286" class="method-signature">
          <span class="method-name">it_should_behave_like</span><span class="method-args">(behaviour_description)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Use this to pull in <a href="ModuleMethods.html#M000296">examples</a> from
shared behaviours. See <a href="../../Runner.html">Spec::Runner</a> for
information about shared behaviours.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000286-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000286-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 51</span>
51:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">it_should_behave_like</span>(<span class="ruby-identifier">behaviour_description</span>)
52:           <span class="ruby-identifier">behaviour</span> = <span class="ruby-ivar">@behaviour</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">find_shared_behaviour</span>(<span class="ruby-identifier">behaviour_description</span>)
53:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">behaviour</span>.<span class="ruby-identifier">nil?</span>
54:             <span class="ruby-identifier">raise</span> <span class="ruby-constant">RuntimeError</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;Shared Behaviour '#{behaviour_description}' can not be found&quot;</span>)
55:           <span class="ruby-keyword kw">end</span>
56:           <span class="ruby-identifier">behaviour</span>.<span class="ruby-identifier">copy_to</span>(<span class="ruby-keyword kw">self</span>)
57:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000287" class="method-detail">
        <a name="M000287"></a>

        <div class="method-heading">
          <a href="#M000287" class="method-signature">
          <span class="method-name">predicate_matchers[matcher_name] = method_on_object<br />
predicate_matchers[matcher_name] = [method1_on_object, method2_on_object]<br />
</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Dynamically generates a custom matcher that will match a predicate on your
class. RSpec provides a couple of these out of the box:
</p>
<pre>
  exist (or state expectations)
    File.should exist(&quot;path/to/file&quot;)

  an_instance_of (for mock argument constraints)
    mock.should_receive(:message).with(an_instance_of(String))
</pre>
<h2>Examples</h2>
<pre>
  class Fish
    def can_swim?
      true
    end
  end

  describe Fish do
    predicate_matchers[:swim] = :can_swim?
    it &quot;should swim&quot; do
      Fish.new.should swim
    end
  end
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000287-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000287-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 97</span>
97:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">predicate_matchers</span>
98:           <span class="ruby-ivar">@predicate_matchers</span> <span class="ruby-operator">||=</span> {<span class="ruby-identifier">:exist</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:exist?</span>, <span class="ruby-identifier">:an_instance_of</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">:is_a?</span>}
99:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000289" class="method-detail">
        <a name="M000289"></a>

        <div class="method-heading">
          <a href="#M000289" class="method-signature">
          <span class="method-name">specify</span><span class="method-args">(description=:__generate_description, opts={}, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Alias for <a href="ModuleMethods.html#M000288">it</a>.
</p>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000289-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000289-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 121</span>
121:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">specify</span>(<span class="ruby-identifier">description</span>=<span class="ruby-identifier">:__generate_description</span>, <span class="ruby-identifier">opts</span>={}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
122:           <span class="ruby-identifier">it</span>(<span class="ruby-identifier">description</span>, <span class="ruby-identifier">opts</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
123:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000293" class="method-detail">
        <a name="M000293"></a>

        <div class="method-heading">
          <a href="#M000293" class="method-signature">
          <span class="method-name">after_all_proc</span><span class="method-args">(behaviour_type)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000293-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000293-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 158</span>
158:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after_all_proc</span>(<span class="ruby-identifier">behaviour_type</span>)
159:           <span class="ruby-identifier">parts</span> = []
160:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">after_all_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
161:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">after_all_parts</span>(<span class="ruby-keyword kw">nil</span>))
162:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">after_all_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
163:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">after_all_parts</span>(<span class="ruby-keyword kw">nil</span>))
164:           <span class="ruby-constant">CompositeProcBuilder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">parts</span>).<span class="ruby-identifier">proc</span>
165:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000294" class="method-detail">
        <a name="M000294"></a>

        <div class="method-heading">
          <a href="#M000294" class="method-signature">
          <span class="method-name">after_each_proc</span><span class="method-args">(behaviour_type)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000294-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000294-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 167</span>
167:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">after_each_proc</span>(<span class="ruby-identifier">behaviour_type</span>)
168:           <span class="ruby-identifier">parts</span> = []
169:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">after_each_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
170:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">after_each_parts</span>(<span class="ruby-keyword kw">nil</span>))
171:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">after_each_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
172:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">after_each_parts</span>(<span class="ruby-keyword kw">nil</span>))
173:           <span class="ruby-constant">CompositeProcBuilder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">parts</span>).<span class="ruby-identifier">proc</span>
174:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000292" class="method-detail">
        <a name="M000292"></a>

        <div class="method-heading">
          <a href="#M000292" class="method-signature">
          <span class="method-name">before_all_proc</span><span class="method-args">(behaviour_type, &amp;error_handler)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000292-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000292-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 149</span>
149:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">before_all_proc</span>(<span class="ruby-identifier">behaviour_type</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">error_handler</span>)
150:           <span class="ruby-identifier">parts</span> = []
151:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">before_all_parts</span>(<span class="ruby-keyword kw">nil</span>))
152:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">before_all_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
153:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">before_all_parts</span>(<span class="ruby-keyword kw">nil</span>))
154:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">before_all_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
155:           <span class="ruby-constant">CompositeProcBuilder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">parts</span>).<span class="ruby-identifier">proc</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">error_handler</span>)
156:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000291" class="method-detail">
        <a name="M000291"></a>

        <div class="method-heading">
          <a href="#M000291" class="method-signature">
          <span class="method-name">before_each_proc</span><span class="method-args">(behaviour_type, &amp;error_handler)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000291-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000291-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 140</span>
140:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">before_each_proc</span>(<span class="ruby-identifier">behaviour_type</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">error_handler</span>)
141:           <span class="ruby-identifier">parts</span> = []
142:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">before_each_parts</span>(<span class="ruby-keyword kw">nil</span>))
143:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-constant">Behaviour</span>.<span class="ruby-identifier">before_each_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
144:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">before_each_parts</span>(<span class="ruby-keyword kw">nil</span>))
145:           <span class="ruby-identifier">parts</span>.<span class="ruby-identifier">push</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">before_each_parts</span>(<span class="ruby-identifier">behaviour_type</span>)) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">behaviour_type</span>.<span class="ruby-identifier">nil?</span>
146:           <span class="ruby-constant">CompositeProcBuilder</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">parts</span>).<span class="ruby-identifier">proc</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">error_handler</span>)
147:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000296" class="method-detail">
        <a name="M000296"></a>

        <div class="method-heading">
          <a href="#M000296" class="method-signature">
          <span class="method-name">examples</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000296-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000296-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 197</span>
197:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">examples</span>
198:           <span class="ruby-ivar">@examples</span> <span class="ruby-operator">||=</span> []
199:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000295" class="method-detail">
        <a name="M000295"></a>

        <div class="method-heading">
          <a href="#M000295" class="method-signature">
          <span class="method-name">included_modules</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000295-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000295-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 193</span>
193:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">included_modules</span>
194:           <span class="ruby-ivar">@included_modules</span> <span class="ruby-operator">||=</span> [<span class="ruby-operator">::</span><span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">Matchers</span>]
195:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000290" class="method-detail">
        <a name="M000290"></a>

        <div class="method-heading">
          <a href="#M000290" class="method-signature">
          <span class="method-name">method_missing</span><span class="method-args">(method_name, *args)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000290-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000290-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/dsl/behaviour_eval.rb, line 133</span>
133:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
134:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">behaviour_superclass</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method_name</span>)
135:             <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">execution_context_class</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">method_name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
136:           <span class="ruby-keyword kw">end</span>
137:           <span class="ruby-keyword kw">super</span>
138:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>